package wu.example.userservernacos.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author benjamin_5
 * @Description
 * @date 2024/8/21
 */
@RestController
public class UserController {

    @Value("${server.port}")
    private Integer port;

    @Value("${spring.application.name}")
    private String serverName;

    @GetMapping("test")
    public String test(){
        return "调用服务" + serverName + "，端口："+port;
    }

}
